<?php

/* @var $this \yii\web\View */
/* @var $content string */

use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use app\assets\AppAsset;
AppAsset::addCss($this, 'test/css/font-awesome-ie7.min.css');
AppAsset::addCss($this, 'test/css/font-awesome.min.css');
AppAsset::addCss($this, 'test/css/bootstrap.min.css');
AppAsset::addScript($this, 'js/tools.js');
AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>
</head>
<?php $this->beginBody() ?>
<?php
//NavBar::begin([
//    'brandLabel' => 'HAAH',
//    'brandUrl' => Yii::$app->homeUrl,
//    'options' => [
//        'class' => 'navbar-inverse navbar-fixed-top',
//    ],
//]);
//echo Nav::widget([
//    'options' => ['class' => 'nav nav-tabs'],
//    'items' => [
//        ['label' => '首页', 'url' => ['/site/index']],
//        ['label' => 'About', 'url' => ['/site/about']],
//        ['label' => 'Contact', 'url' => ['/site/contact']],
//        ['label'=>'留言内容','url'=>['/site/nihao']], Yii::$app->user->isGuest ?
//        ['label' => 'Login', 'url' => ['/site/login']] :
//        ['label' => 'Logout (' . Yii::$app->user->identity->username . ')', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']],
//        ['label'=>'注册','url'=>['/site/register']]
//    ],
//]);

//NavBar::end();
?>
<?= $content ?>

<footer class="footer">
    <div class="container">
        <p class="pull-left">&copy; My Company <?= date('Y') ?></p>

        <p class="pull-right"><?= Yii::powered() ?></p>
    </div>
</footer>

<?php $this->endBody() ?>
<script>
       $('li').click(function(){
           var currentIndex = $(this).index();
        $('li').removeClass('active').eq(currentIndex).addClass('active');})
</script>
</html>
<?php $this->endPage() ?>
